package com.example.a2;

import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class logActivity extends AppCompatActivity {
    private Button bt;
    static final String LIFE_TAG = "LogActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_log);
        Log.v(logActivity.LIFE_TAG, "FirstActivity ---> onCreat");
        Button bt = (Button) findViewById(R.id.bt);
        bt.setOnClickListener(new ButtonOnClickListener());
    }
    class ButtonOnClickListener implements View.OnClickListener{
        public void onClick(View v) {
            Intent intent = new Intent();
            intent.setClass(logActivity.this, logActivity2.class);
            logActivity.this.startActivity(intent);
        }
    }
    protected void onDestroy() {
        Log.v(logActivity.LIFE_TAG, "FirstActivity ---> onDestroy");
        super.onDestroy();
    }

    protected void onPause() {
        Log.v(logActivity.LIFE_TAG, "FirstActivity ---> onPause");
        super.onPause();
    }

    protected void onRestart() {
        Log.v(logActivity.LIFE_TAG, "FirstActivity ---> onRestart");
        super.onRestart();
    }

    protected void onResume() {
        Log.v(logActivity.LIFE_TAG, "FirstActivity ---> onResume");
        super.onResume();
    }

    protected void onStart() {
        Log.v(logActivity.LIFE_TAG, "FirstActivity ---> onStart");
        super.onStart();
    }

    protected void onStop(){
        Log.v(logActivity.LIFE_TAG,"FirstActivity ---> onStop");
        super.onStop();
    }

}
